#ifndef _H__TIMES_H__
#define _H__TIMES_H__

#include "linux_def.h"
#include "core.h"


typedef struct{
	time_t	sec;
	int	msec;
	int	gmtoff;
}g_time_t;


void time_init();
void time_update(time_t sec, int msec);
time_t next_time(time_t when);

extern volatile g_time_t *g_cached_time;

#define g_time()	cached_time->sec
#define g_timeofday()	(g_time_t*)cached_time

extern volatile uintptr_t current_msec;

#endif
